<?php

class Manager_Form_Catalog extends Zend_Form
{

    public function init()
    {
        $categoryName = new Zend_Form_Element_Text('Category_Name');
        $categoryName->setLabel('Category Name')->setRequired(true)->addValidator('notEmpty')
       ->setDescription('<a href="#" id="combocat">Link</a>')
    ->setDecorators(array(
        'ViewHelper',
        array('Description', array('escape' => false, 'tag' => false)),
        array('HtmlTag', array('tag' => 'dd')),
        array('Label', array('tag' => 'dt')),
        'Errors',
      ));
        $categoryName->setAttrib('readonly','readonly');
        
        $categoryHid = new Zend_Form_Element_Hidden('Category_Code');
        $categoryHid->setDecorators(array('ViewHelper',array('Description',array('escape'=>false))));
        
        $productName = new Zend_Form_Element_Text('Product_Name');
        $productName->setLabel('Product Name')->setRequired(true)->addValidator('notEmpty');
        
        $productInfo= new Zend_Form_Element_Textarea('Product_Info');
        $productInfo->setAttrib('rows', 6);
        $productInfo->setAttrib('cols', 40);
        $productInfo->setLabel('Category Info')->setRequired(true);
      
          $productImages = new Zend_Form_Element_File('Product_Images');
          $productImages->setLabel('File')->setDestination(APPLICATION_PATH ."/../catalog");

         
          
            
           
        $purchaseCost = new Zend_Form_Element_Text('Purchase_Cost');
        $purchaseCost->setLabel('Purchase Cost')->setRequired(true)->addValidator('notEmpty');
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('save');
       $this->setAttrib('enctype','multipart/form-data');
       $this->addElements(array($categoryName,$categoryHid,$productName,$productInfo,$productImages,$purchaseCost,$submit));
     
      
    }


}

